package com.gregbugaj.gps;

import com.gregbugaj.gps.cmd.Command;
import com.gregbugaj.gps.cmd.GPGLLCmd;
import com.gregbugaj.gps.cmd.GPVTGCmd;


public class CommandFactory {
	
	public static Command getCommand(String cmd, String commandString) {
		CommandType type=CommandType.fromValue(cmd);
		if(type==null){
			return null;
		}
		
		switch(type){
			case GPGLL:return new GPGLLCmd(type, commandString);
			case GPVTG:return new GPVTGCmd(type, commandString);
		};
		
		return null;
	}

}
